﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/iShopping-Admin.Master" AutoEventWireup="true" CodeBehind="QuanLyThongTin.aspx.cs" Inherits="iShopping.Admin.QuanLyThongTin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../css/ThongTinCongTy.css" rel="stylesheet" type="text/css" />
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="main_content" runat="server">
<div id="title"><b>QUẢN LÝ THÔNG TIN CÔNG TY</b></div>
    <asp:FormView ID="FormView2" runat="server" DataSourceID="SqlDataSource1" 
        DataKeyNames="MaThongTinCongTy">
        <EditItemTemplate>
            <table>
        <tr>
            <td class="right"><br />WebSite:</td>
            <td ><br /><asp:TextBox ID="WebSiteTextBox" runat="server" Text='<%# Bind("WebSite") %>' Width="500" /></td>
        </tr>
        <tr>
            <td class="right"><br />Email:</td>
            <td><br /><asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' Width="500"/></td>
        </tr>
        <tr>
            <td class="right"><br />DiaChiCongTy:</td>
            <td><br /><asp:TextBox ID="DiaChiCongTyTextBox" runat="server" 
                Text='<%# Bind("DiaChiCongTy") %>' Width="500"/></td>
        </tr>
        <tr>
            <td class="right"><br />TruSoChinh:</td>
            <td><br /><asp:TextBox ID="TruSoChinhTextBox" runat="server" 
                Text='<%# Bind("TruSoChinh") %>' Width="500" /></td>
        </tr>
        <tr>
            <td class="right"><br />HoTroKinhDoanh:</td>
            <td><br /><asp:TextBox ID="HoTroKinhDoanhTextBox" runat="server" 
                Text='<%# Bind("HoTroKinhDoanh") %>' Width="500"/></td>
        </tr>
        <tr>
            <td class="right"><br />HoTroKiThuat:</td>
            <td><br /><asp:TextBox ID="HoTroKiThuatTextBox" runat="server" 
                Text='<%# Bind("HoTroKiThuat") %>' Width="500"/></td>
        </tr>
        <tr>
            <td class="right"></td>
            <td><asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Sửa" ForeColor="#6600CC" Font-Bold="True"/>
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Huỷ" ForeColor="#6600CC" Font-Bold="True"/></td>
        </tr>   
        </table>
        
        </EditItemTemplate>
        <InsertItemTemplate>
            MaThongTinCongTy:
            <asp:TextBox ID="MaThongTinCongTyTextBox" runat="server" 
                Text='<%# Bind("MaThongTinCongTy") %>' />
            <br />
            WebSite:
            <asp:TextBox ID="WebSiteTextBox" runat="server" Text='<%# Bind("WebSite") %>' />
            <br />
            Email:
            <asp:TextBox ID="EmailTextBox" runat="server" 
                Text='<%# Bind("Email") %>' />
            <br />
            DiaChiCongTy:
            <asp:TextBox ID="DiaChiCongTyTextBox" runat="server" 
                Text='<%# Bind("DiaChiCongTy") %>' />
            <br />
            TruSoChinh:
            <asp:TextBox ID="TruSoChinhTextBox" runat="server" 
                Text='<%# Bind("TruSoChinh") %>' />
            <br />
            HoTroKinhDoanh:
            <asp:TextBox ID="HoTroKinhDoanhTextBox" runat="server" 
                Text='<%# Bind("HoTroKinhDoanh") %>' />
            <br />
            HoTroKiThuat:
            <asp:TextBox ID="HoTroKiThuatTextBox" runat="server" 
                Text='<%# Bind("HoTroKiThuat") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        
        <ItemTemplate>
        <table>
        <tr>
            <td class="right"><br />
            WebSite:</td>
            <td><br /><asp:Label ID="WebSiteLabel" runat="server" Text='<%# Bind("WebSite") %>' /><td>
        </tr>
        <tr>
            <td class="right"><br />
            Email:</td>
            <td><br /><asp:Label ID="EmailLabel" runat="server" Text='<%# Bind("Email") %>' /></td>
        <tr>
            <td class="right"><br />
            Địa chỉ công ty:</td>
            <td><br /><asp:Label ID="DiaChiCongTyLabel" runat="server" 
                Text='<%# Bind("DiaChiCongTy") %>' /></td>
        <tr>
            <td class="right"><br />
            Trụ sở chính:</td>
            <td><br /><asp:Label ID="TruSoChinhLabel" runat="server" 
                Text='<%# Bind("TruSoChinh") %>' /></td>
        <tr>
            <td class="right"><br />
            Hỗ trợ kinh doanh:</td>
            <td><br /><asp:Label ID="HoTroKinhDoanhLabel" runat="server" 
                Text='<%# Bind("HoTroKinhDoanh") %>' /></td>
        <tr>
            <td class="right"><br />
            Hỗ trợ kĩ thuật:</td>
            <td><br /><asp:Label ID="HoTroKiThuatLabel" runat="server" 
                Text='<%# Bind("HoTroKiThuat") %>' /></td>
            <br />
        </tr>
        <tr>
            <td></td>
            <td><br /><asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                CommandName="Edit" Text="Chỉnh sửa"  ForeColor="#6600CC" Font-Bold="True" /></td>
        </tr>
        </table>   
        </ItemTemplate>
    </asp:FormView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DAUGIAConnectionString %>" 
        SelectCommand="SELECT * FROM [THONGTINCONGTY]" UpdateCommand="update THONGTINCONGTY
set WebSite = @website,
	Email = @email,
	DiaChiCongTy = @diachicongty,
	TruSoChinh = @trusochinh,
	HoTroKinhDoanh = @hotrokinhdoanh,
	HoTroKiThuat =@hotrokithuat
where MaThongTinCongTy = @maThongTinCongTy" >
        <UpdateParameters>
            <asp:Parameter Name="website" />
            <asp:Parameter Name="email" />
            <asp:Parameter Name="diachicongty" />
            <asp:Parameter Name="trusochinh" />
            <asp:Parameter Name="hotrokinhdoanh" />
            <asp:Parameter Name="hotrokithuat" />
            <asp:Parameter Name="maThongTinCongTy" />
        </UpdateParameters>
        
        </asp:SqlDataSource>
        
        
        
    
</asp:Content>

